package multithreading.threadd.commonmethod;

public class MyDemo1 extends Thread{
    MyDemo1(String name){
        //把有惨构造器里面的参数代替父类里面的参数
        super(name);
    }
    @Override
public void run(){
        Thread C=Thread.currentThread();
        for (int i = 0; i <5 ; i++) {

            System.out.println(C.getName()+"线程输出"+i+"次");

        }
    }
}
